

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">

  <link rel="apple-touch-icon" sizes="76x76" href="/img/fluid.png">
  <link rel="icon" href="/img/fluid.png">
  

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="计算机qwq">
  <meta name="keywords" content="">
  
    <meta name="description" content="下载安装脚本并安装1wget https:&#x2F;&#x2F;gitee.com&#x2F;computerqwq&#x2F;gvm_xiazai&#x2F;releases&#x2F;download&#x2F;xiazia&#x2F;gvm-installer  运行 1bash .&#x2F;gvm-installer  使用教程常用命令 1234567891011121314# 查看可安装版本gvm listall# 查看已安装版本gvm list# 安装 Go 版本（1.">
<meta property="og:type" content="article">
<meta property="og:title" content="安装gvm">
<meta property="og:url" content="https://blog.computerqwq.top/2025/01/19/an-zhuang-gvm/index.html">
<meta property="og:site_name" content="计算机">
<meta property="og:description" content="下载安装脚本并安装1wget https:&#x2F;&#x2F;gitee.com&#x2F;computerqwq&#x2F;gvm_xiazai&#x2F;releases&#x2F;download&#x2F;xiazia&#x2F;gvm-installer  运行 1bash .&#x2F;gvm-installer  使用教程常用命令 1234567891011121314# 查看可安装版本gvm listall# 查看已安装版本gvm list# 安装 Go 版本（1.">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://blog.computerqwq.top/tupian/gvm/1737272549475.png">
<meta property="article:published_time" content="2025-01-19T06:54:17.000Z">
<meta property="article:modified_time" content="2025-02-11T13:45:15.435Z">
<meta property="article:author" content="计算机qwq">
<meta property="article:tag" content="gvm">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://blog.computerqwq.top/tupian/gvm/1737272549475.png">
  
  
    <meta name="referrer" content="no-referrer-when-downgrade">
  
  
  <title>安装gvm - 计算机</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/c/font_1749284_5i9bdhy70f8.css">



<link rel="stylesheet" href="//at.alicdn.com/t/c/font_1736178_k526ubmyhba.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"blog.computerqwq.top","root":"/","version":"1.9.8","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"follow_dnt":true,"baidu":null,"google":{"measurement_id":null},"tencent":{"sid":null,"cid":null},"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false},"umami":{"src":null,"website_id":null,"domains":null,"start_time":"2024-01-01T00:00:00.000Z","token":null,"api_server":null}},"search_path":"/local-search.xml","include_content_in_search":true};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  

  

  

  

  

  



  
<meta name="generator" content="Hexo 7.3.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>计算机qwq的小破站</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/" target="_self">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/" target="_self">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/" target="_self">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/" target="_self">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/" target="_self">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/default.png') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="安装gvm"></span>
          
        </div>

        
          
  <div class="mt-3">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-author" aria-hidden="true"></i>
        计算机qwq
      </span>
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2025-01-19 14:54" pubdate>
          2025年1月19日 下午
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          604 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          6 分钟
        
      </span>
    

    
    
      
        <span id="busuanzi_container_page_pv" style="display: none">
          <i class="iconfont icon-eye" aria-hidden="true"></i>
          <span id="busuanzi_value_page_pv"></span> 次
        </span>
        

      
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <h1 id="seo-header">安装gvm</h1>
            
            
              <div class="markdown-body">
                
                <h1 id="下载安装脚本并安装"><a href="#下载安装脚本并安装" class="headerlink" title="下载安装脚本并安装"></a>下载安装脚本并安装</h1><figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs awk">wget https:<span class="hljs-regexp">//gi</span>tee.com<span class="hljs-regexp">/computerqwq/g</span>vm_xiazai<span class="hljs-regexp">/releases/</span>download<span class="hljs-regexp">/xiazia/g</span>vm-installer<br></code></pre></td></tr></table></figure>

<p>运行</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">bash ./gvm-installer<br></code></pre></td></tr></table></figure>

<h1 id="使用教程"><a href="#使用教程" class="headerlink" title="使用教程"></a>使用教程</h1><p>常用命令</p>
<figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs apache"><span class="hljs-comment"># 查看可安装版本</span><br><span class="hljs-attribute">gvm</span> listall<br><span class="hljs-comment"># 查看已安装版本</span><br><span class="hljs-attribute">gvm</span> list<br><span class="hljs-comment"># 安装 Go 版本（1.4&gt;版本，需要加上-B）</span><br><span class="hljs-attribute">gvm</span> install go1.<span class="hljs-number">21</span>.<span class="hljs-number">2</span> -B<br><span class="hljs-comment"># 使用指定版本</span><br><span class="hljs-attribute">gvm</span> use go1.<span class="hljs-number">21</span>.<span class="hljs-number">2</span><br><span class="hljs-comment"># 设置默认版本</span><br><span class="hljs-attribute">gvm</span> use go1.<span class="hljs-number">21</span>.<span class="hljs-number">2</span> --default<br><span class="hljs-comment"># 卸载 Go 版本</span><br><span class="hljs-attribute">gvm</span> uninstall go1.<span class="hljs-number">21</span>.<span class="hljs-number">2</span><br><span class="hljs-comment"># 要完全删除 gvm 以及所有已安装的 Go 版本和软件包</span><br><span class="hljs-attribute">gvm</span> implode<br></code></pre></td></tr></table></figure>

<h2 id="配置gvm镜像源"><a href="#配置gvm镜像源" class="headerlink" title="配置gvm镜像源"></a>配置gvm镜像源</h2><figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs routeros"><span class="hljs-built_in">export</span> <span class="hljs-attribute">GO_BINARY_BASE_URL</span>=https://mirrors.aliyun.com/golang/<br></code></pre></td></tr></table></figure>

<p>官方国内镜像：<a target="_blank" rel="noopener" href="https://golang.google.cn/dl/">https://golang.google.cn/dl/</a><br>阿里云镜像：<a target="_blank" rel="noopener" href="https://mirrors.aliyun.com/golang/">https://mirrors.aliyun.com/golang/</a><br>中科大镜像：<a target="_blank" rel="noopener" href="http://mirrors.ustc.edu.cn/golang/">http://mirrors.ustc.edu.cn/golang/</a></p>
<h2 id="报错1"><a href="#报错1" class="headerlink" title="报错1"></a>报错1</h2><p><em><strong>在使用use的时候会报错</strong></em></p>
<figure class="highlight subunit"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs subunit"><span class="hljs-keyword">ERROR: </span>Unrecognized command line argument: &#x27;use&#x27;<br></code></pre></td></tr></table></figure>

<p>说实话真tm离谱了这bug现在还不修！！</p>
<h3 id="错误1解决方法"><a href="#错误1解决方法" class="headerlink" title="错误1解决方法"></a>错误1解决方法</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment">#将use文件复制到上一级目录，并赋予执行权限即可</span><br><span class="hljs-built_in">cp</span> -rp .gvm/scripts/env/use  .gvm/scripts/use<br><span class="hljs-built_in">chmod</span> 775  .gvm/scripts/use<br></code></pre></td></tr></table></figure>

<h2 id="go换镜像源"><a href="#go换镜像源" class="headerlink" title="go换镜像源"></a>go换镜像源</h2><figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><code class="hljs routeros"><span class="hljs-comment"># 启用 Go Modules 功能</span><br>go env -w <span class="hljs-attribute">GO111MODULE</span>=on<br> <br><span class="hljs-comment"># 配置 GOPROXY 环境变量，以下三选一</span><br> <br><span class="hljs-comment"># 1. 七牛 CDN</span><br> <br>go env -w  <span class="hljs-attribute">GOPROXY</span>=https://goproxy.cn,direct<br> <br><span class="hljs-comment"># 2. 阿里云</span><br> <br>go env -w <span class="hljs-attribute">GOPROXY</span>=https://mirrors.aliyun.com/goproxy/,direct<br> <br><span class="hljs-comment"># 3. 官方</span><br> <br>go env -w  <span class="hljs-attribute">GOPROXY</span>=https://goproxy.io,direct<br> <br><span class="hljs-comment"># 确认一下：</span><br>$ go env | grep GOPROXY<br><span class="hljs-attribute">GOPROXY</span>=<span class="hljs-string">&quot;[https://goproxy.cn](https://goproxy.cn/)&quot;</span><br></code></pre></td></tr></table></figure>

<h3 id="Windows上"><a href="#Windows上" class="headerlink" title="Windows上"></a>Windows上</h3><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><code class="hljs elixir"><span class="hljs-comment"># 启用 Go Modules 功能</span><br><span class="hljs-variable">$env</span><span class="hljs-symbol">:GO111MODULE=<span class="hljs-string">&quot;on&quot;</span></span><br> <br><span class="hljs-comment"># 配置 GOPROXY 环境变量，以下三选一</span><br> <br><span class="hljs-comment"># 1. 七牛 CDN</span><br><span class="hljs-variable">$env</span><span class="hljs-symbol">:GOPROXY=<span class="hljs-string">&quot;https://goproxy.cn,direct&quot;</span></span><br> <br><span class="hljs-comment"># 2. 阿里云</span><br><span class="hljs-variable">$env</span><span class="hljs-symbol">:GOPROXY=<span class="hljs-string">&quot;https://mirrors.aliyun.com/goproxy/,direct&quot;</span></span><br> <br><span class="hljs-comment"># 3. 官方</span><br><span class="hljs-variable">$env</span><span class="hljs-symbol">:GOPROXY=<span class="hljs-string">&quot;https://goproxy.io,direct&quot;</span></span><br> <br><span class="hljs-comment"># 确认一下：</span><br><span class="hljs-variable">$ </span>go env | grep <span class="hljs-title class_">GOPROXY</span><br><span class="hljs-title class_">GOPROXY</span>=<span class="hljs-string">&quot;[https://goproxy.cn](https://goproxy.cn/)&quot;</span><br></code></pre></td></tr></table></figure>

<h2 id="安装go"><a href="#安装go" class="headerlink" title="安装go"></a>安装go</h2><figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><code class="hljs apache"><span class="hljs-comment"># 版本号&gt;1.4需要加-B，表示只安装二进制文件。</span><br><span class="hljs-attribute">gvm</span> install go1.<span class="hljs-number">4</span> -B<br><span class="hljs-attribute">gvm</span> use go1.<span class="hljs-number">4</span><br><span class="hljs-comment"># export GOROOT_BOOTSTRAP=$GOROOT</span><br><span class="hljs-comment"># 安装1.7+版本需要先安装1.4</span><br><span class="hljs-attribute">gvm</span> install go1.<span class="hljs-number">17</span>.<span class="hljs-number">13</span> -B<br><span class="hljs-attribute">gvm</span> use go1.<span class="hljs-number">17</span>.<span class="hljs-number">13</span><br><span class="hljs-comment"># export GOROOT_BOOTSTRAP=$GOROOT</span><br><span class="hljs-comment"># 安装1.20+版本需要先安装1.17</span><br><span class="hljs-attribute">gvm</span> install go1.<span class="hljs-number">21</span>.<span class="hljs-number">2</span> -B<br><span class="hljs-attribute">gvm</span> use go1.<span class="hljs-number">21</span>.<span class="hljs-number">2</span><br><span class="hljs-comment"># 设置为默认版本</span><br><span class="hljs-attribute">gvm</span> use go1.<span class="hljs-number">21</span>.<span class="hljs-number">2</span> --default<br></code></pre></td></tr></table></figure>

<p>为什么要加-b？<br>因为谷歌在1.5版本使用了go编译go的逻辑，如果原本电脑上没有go就无法编译。</p>
<h2 id="踏马的离谱问题"><a href="#踏马的离谱问题" class="headerlink" title="踏马的离谱问题"></a>踏马的离谱问题</h2><p>在安装并且使用use切换go版本后无效！老子就xxxxxx本来安装就麻烦死了，你给我搞这出老子就xxxxx。<br>说一下解决方法<br>把下载好的go添加进变量内就开始使用了。</p>
<h1 id="设置变量方法"><a href="#设置变量方法" class="headerlink" title="设置变量方法"></a>设置变量方法</h1><figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs routeros"><span class="hljs-built_in">export</span> <span class="hljs-attribute">PATH</span>=<span class="hljs-variable">$PATH</span>:/用户目录/.gvm/gos/go版本号/bin<br></code></pre></td></tr></table></figure>

<p>以下是实例</p>
<figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs elixir">export <span class="hljs-title class_">PATH</span>=\<span class="hljs-variable">$PATH</span><span class="hljs-symbol">:/home/uusama/mysql/bin</span><br></code></pre></td></tr></table></figure>

<p>具体可以去看<a target="_blank" rel="noopener" href="https://www.cnblogs.com/youyoui/p/10680329.html">这篇文章</a></p>
<h1 id="写后感想"><a href="#写后感想" class="headerlink" title="写后感想"></a>写后感想</h1><p><em><strong>真是太tm烦了！！！！！！！</strong></em><br>爷要爆炸！！！！<br><img src="/tupian/gvm/1737272549475.png" srcset="/img/loading.gif" lazyload alt="1737272549475"></p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/gvm/" class="print-no-link">#gvm</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>安装gvm</div>
      <div>https://blog.computerqwq.top/2025/01/19/an-zhuang-gvm/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>计算机qwq</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2025年1月19日</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>更新于</div>
          <div>2025年2月11日</div>
        </div>
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-cc-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2025/01/20/answer-bian-yi/" title="answer编译">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">answer编译</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2025/01/16/qing-wu-sui-yi-geng-xin-xiang-mu-ji-ceng/" title="请勿随意更新项目基层">
                        <span class="hidden-mobile">请勿随意更新项目基层</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.4/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.20.1/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/5.0.0/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>

  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
